function cellStyle(e, t, o) {
	var n = ["active", "success", "info", "warning", "danger"];
	return o % 2 === 0 && o / 2 < n.length ? {
		classes: n[o / 2]
	}: {}
}
function rowStyle(e, t) {
	var o = ["active", "success", "info", "warning", "danger"];
	return t % 2 === 0 && t / 2 < o.length ? {
		classes: o[t / 2]
	}: {}
}
function scoreSorter(e, t) {
	return e > t ? 1 : t > e ? -1 : 0
}
function nameFormatter(e) {
	return e + '<i class="icon wb-book" aria-hidden="true"></i> '
}
function starsFormatter(e) {
	return '<i class="icon wb-star" aria-hidden="true"></i> ' + e
}
function queryParams() {
	return {
		type: "owner",
		sort: "updated",
		direction: "desc",
		per_page: 100,
		page: 1
	}
}
function buildTable(e, t, o) {
	var n, l, s, a = [],
	c = [];
	for (n = 0; t > n; n++) a.push({
		field: "字段" + n,
		title: "单元" + n
	});
	for (n = 0; o > n; n++) {
		for (s = {},
		l = 0; t > l; l++) s["字段" + l] = "Row-" + n + "-" + l;
		c.push(s)
	}
	e.bootstrapTable("destroy").bootstrapTable({
		columns: a,
		data: c,
		iconSize: "outline",
		icons: {
			columns: "glyphicon-list"
		}
	})
} !
function(e, t, o) {
	"use strict"; !
	function() {
		o("#exampleTableColumns").bootstrapTable({
			url: "js/demo/bootstrap_table_test.json",
			height: "400",
			iconSize: "outline",
			showColumns: !0,
			icons: {
				refresh: "glyphicon-repeat",
				toggle: "glyphicon-list-alt",
				columns: "glyphicon-list"
			}
		})
	} (),
	buildTable(o("#exampleTableLargeColumns"), 50, 50),
	function() {
		o("#exampleTableToolbar").bootstrapTable({
			url: "js/demo/bootstrap_table_test2.json",
			search: !0,
			showRefresh: !0,
			showToggle: !0,
			showColumns: !0,
			toolbar: "#exampleToolbar",
			iconSize: "outline",
			icons: {
				refresh: "glyphicon-repeat",
				toggle: "glyphicon-list-alt",
				columns: "glyphicon-list"
			}
		})
	} (),
	function() {
		o("#exampleTableEvents").bootstrapTable({
			//url: "js/demo/bootstrap_table_test.json",
			url: "/genTable/queryDemo",
			method: "post",
			queryParams: function(params) {
				console.log("---params---");
				console.log(params);
				return {
					length: params.limit,
					pageNo: params.pageNumber,
					UserName: 'test'
				}
			},
			pageNumber: 1,
			pageSize: 10,
			pageList: [5, 10, 20, 50, 100],
			search: !0,
			pagination: !0,
			showRefresh: !0,
			showToggle: !0,
			showColumns: !0,
			iconSize: "outline",
			toolbar: "#exampleTableEventsToolbar",
			icons: {
				refresh: "glyphicon-repeat",
				toggle: "glyphicon-list-alt",
				columns: "glyphicon-list"
			}
		});
		var e = o("#examplebtTableEventsResult");
		o("#exampleTableEvents").on("all.bs.table",
		function(e, t, o) {
			console.log("Event:", t, ", data:", o)
		}).on("click-row.bs.table",
		function() {
			e.text("Event: click-row.bs.table")
		}).on("dbl-click-row.bs.table",
		function() {
			e.text("Event: dbl-click-row.bs.table")
		}).on("sort.bs.table",
		function() {
			e.text("Event: sort.bs.table")
		}).on("check.bs.table",
		function() {
			e.text("Event: check.bs.table")
		}).on("uncheck.bs.table",
		function() {
			e.text("Event: uncheck.bs.table")
		}).on("check-all.bs.table",
		function() {
			e.text("Event: check-all.bs.table")
		}).on("uncheck-all.bs.table",
		function() {
			e.text("Event: uncheck-all.bs.table")
		}).on("load-success.bs.table",
		function() {
			e.text("Event: load-success.bs.table")
		}).on("load-error.bs.table",
		function() {
			e.text("Event: load-error.bs.table")
		}).on("column-switch.bs.table",
		function() {
			e.text("Event: column-switch.bs.table")
		}).on("page-change.bs.table",
		function() {
			e.text("Event: page-change.bs.table")
		}).on("search.bs.table",
		function() {
			e.text("Event: search.bs.table")
		});
		console.log(66666);
		
		//var ei = o(".glyphicon-plus");
		//console.log(ei.parent().html());
		o(".glyphicon-search").click(function(){
			console.log(777);
			o("#exampleTableEvents").bootstrapTable("insertRow", 
					{ index: 0, 
					  row: {
						  id : '<input type="text" name="modelName" value="" readonly/>',
						  modelName : '<input type="text" name="modelName" value="test"/>'
					  } });
			console.log(888);
		});
		
		
		function actionFormatter(value, row, index) {
			console.log(999);
		    return [
		        '<a class="edit ml10" href="javascript:void(0)" title="Edit">',
		        '<i class="glyphicon glyphicon-edit"></i>',
		        '</a>',
		        '<a class="remove ml10" href="javascript:void(0)" title="Remove">',
		        '<i class="glyphicon glyphicon-remove"></i>',
		        '</a>'
		    ].join('');
		};
	} ()
} (document, window, jQuery);


window.actionEvents = {
       'click .edit': function (e, value, row, index) {
            //edit
            console.log('---edit---');
       },
       'click .remove': function (e, value, row, index) {
            //remove
            if (confirm("You sure remove it?")) {
                console.log('---remove---');
           }
       },
  };


